package cn.iocoder.yudao.module.jifenyuan.controller.app.usercurrentroom;

import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;

import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;

import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;

import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;

import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;

import cn.iocoder.yudao.module.jifenyuan.controller.app.usercurrentroom.vo.*;
import cn.iocoder.yudao.module.jifenyuan.dal.dataobject.usercurrentroom.UserCurrentRoomDO;
import cn.iocoder.yudao.module.jifenyuan.convert.usercurrentroom.UserCurrentRoomConvert;
import cn.iocoder.yudao.module.jifenyuan.service.usercurrentroom.UserCurrentRoomService;

@Tag(name = "用户 APP - 查看当前所在房间")
@RestController
@RequestMapping("/jifenyuan/user-current-room")
@Validated
public class AppUserCurrentRoomController {

    @Resource
    private UserCurrentRoomService userCurrentRoomService;

//    @PostMapping("/create")
//    @Operation(summary = "创建查看当前所在房间")
//
//    public CommonResult<Long> createUserCurrentRoom(@Valid @RequestBody AppUserCurrentRoomCreateReqVO createReqVO) {
//        return success(userCurrentRoomService.createUserCurrentRoom(createReqVO));
//    }
//
//    @PutMapping("/update")
//    @Operation(summary = "更新查看当前所在房间")
//
//    public CommonResult<Boolean> updateUserCurrentRoom(@Valid @RequestBody AppUserCurrentRoomUpdateReqVO updateReqVO) {
//        userCurrentRoomService.updateUserCurrentRoom(updateReqVO);
//        return success(true);
//    }
//
//    @DeleteMapping("/delete")
//    @Operation(summary = "删除查看当前所在房间")
//    @Parameter(name = "id", description = "编号", required = true)
//
//    public CommonResult<Boolean> deleteUserCurrentRoom(@RequestParam("id") Long id) {
//        userCurrentRoomService.deleteUserCurrentRoom(id);
//        return success(true);
//    }
//
//    @GetMapping("/get")
//    @Operation(summary = "获得查看当前所在房间")
//    @Parameter(name = "id", description = "编号", required = true, example = "1024")
//
//    public CommonResult<AppUserCurrentRoomRespVO> getUserCurrentRoom(@RequestParam("id") Long id) {
//        UserCurrentRoomDO userCurrentRoom = userCurrentRoomService.getUserCurrentRoom(id);
//        return success(UserCurrentRoomConvert.INSTANCE.convert(userCurrentRoom));
//    }
//
//    @GetMapping("/list")
//    @Operation(summary = "获得查看当前所在房间列表")
//    @Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048")
//
//    public CommonResult<List<AppUserCurrentRoomRespVO>> getUserCurrentRoomList(@RequestParam("ids") Collection<Long> ids) {
//        List<UserCurrentRoomDO> list = userCurrentRoomService.getUserCurrentRoomList(ids);
//        return success(UserCurrentRoomConvert.INSTANCE.convertList(list));
//    }
//
//    @GetMapping("/page")
//    @Operation(summary = "获得查看当前所在房间分页")
//
//    public CommonResult<PageResult<AppUserCurrentRoomRespVO>> getUserCurrentRoomPage(@Valid AppUserCurrentRoomPageReqVO pageVO) {
//        PageResult<UserCurrentRoomDO> pageResult = userCurrentRoomService.getUserCurrentRoomPage(pageVO);
//        return success(UserCurrentRoomConvert.INSTANCE.convertPage(pageResult));
//    }
//
//    @GetMapping("/export-excel")
//    @Operation(summary = "导出查看当前所在房间 Excel")
//
//    @OperateLog(type = EXPORT)
//    public void exportUserCurrentRoomExcel(@Valid AppUserCurrentRoomExportReqVO exportReqVO,
//              HttpServletResponse response) throws IOException {
//        List<UserCurrentRoomDO> list = userCurrentRoomService.getUserCurrentRoomList(exportReqVO);
//        // 导出 Excel
//        List<AppUserCurrentRoomExcelVO> datas = UserCurrentRoomConvert.INSTANCE.convertList02(list);
//        ExcelUtils.write(response, "查看当前所在房间.xls", "数据", AppUserCurrentRoomExcelVO.class, datas);
//    }

}
